package com.itheima05;

public class Company implements Money {
    private double totaMoney;

    public Company() {
    }

    public Company(double totaMoney) {
        this.totaMoney = totaMoney;
    }

    public double getTotaMoney() {
        return totaMoney;
    }

    public void setTotaMoney(double totaMoney) {
        this.totaMoney = totaMoney;
    }

    @Override
    public void paySalary(Employee emp) {
        totaMoney -= emp.getSalary();
        System.out.println("给" + emp.getName() + "发工资" + emp.getSalary() + ",公司还剩余" + totaMoney);

    }
}
